home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / CMMComponent.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  11.3 KB  |  392 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMMComponent.a
  3. ;
  4. ;    Contains:    ColorSync CMM Components
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.1
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1994-1997 by Apple Computer, Inc. All rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__CMMCOMPONENT__') = 'UNDEFINED' THEN
  19. __CMMCOMPONENT__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  28.     include 'Components.a'
  29.     ENDIF
  30.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  31.     include 'CMApplication.a'
  32.     ENDIF
  33.  
  34.  
  35. CMMInterfaceVersion                EQU        1
  36. ;  Component function selectors 
  37. ;  Required 
  38.  
  39. kCMMInit                        EQU        0
  40. kNCMMInit                        EQU        6
  41. kCMMMatchColors                    EQU        1
  42. kCMMCheckColors                    EQU        2
  43. ;  Optional 
  44.  
  45. kCMMValidateProfile                EQU        8
  46. kCMMFlattenProfile                EQU        14
  47. kCMMUnflattenProfile            EQU        15
  48. kCMMMatchBitmap                    EQU        9
  49. kCMMCheckBitmap                    EQU        10
  50. kCMMMatchPixMap                    EQU        3
  51. kCMMCheckPixMap                    EQU        4
  52. kCMMConcatenateProfiles            EQU        5
  53. kCMMConcatInit                    EQU        7
  54. kCMMNewLinkProfile                EQU        16
  55. kCMMGetPS2ColorSpace            EQU        11
  56. kCMMGetPS2ColorRenderingIntent    EQU        12
  57. kCMMGetPS2ColorRendering        EQU        13
  58. kCMMGetPS2ColorRenderingVMSize    EQU        17
  59. kCMMGetNamedColorInfo            EQU        70
  60. kCMMGetNamedColorValue            EQU        71
  61. kCMMGetIndNamedColorValue        EQU        72
  62. kCMMGetNamedColorIndex            EQU        73
  63. kCMMGetNamedColorName            EQU        74
  64.  
  65. ;
  66. ; pascal CMError NCMInit(ComponentInstance CMSession, CMProfileRef srcProfile, CMProfileRef dstProfile)
  67. ;
  68.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  69.         Macro
  70.         _NCMInit
  71.             move.l              #$00080006,-(sp)
  72.             moveq               #0,D0
  73.             dc.w                $A82A
  74.         EndM
  75.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  76.         IMPORT_CFM_FUNCTION NCMInit
  77.     ENDIF
  78.  
  79. ;
  80. ; pascal CMError CMInit(ComponentInstance CMSession, CMProfileHandle srcProfile, CMProfileHandle dstProfile)
  81. ;
  82.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  83.         Macro
  84.         _CMInit
  85.             move.l              #$00080000,-(sp)
  86.             moveq               #0,D0
  87.             dc.w                $A82A
  88.         EndM
  89.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  90.         IMPORT_CFM_FUNCTION CMInit
  91.     ENDIF
  92.  
  93. ;
  94. ; pascal CMError CMMatchColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count)
  95. ;
  96.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  97.         Macro
  98.         _CMMatchColors
  99.             move.l              #$00080001,-(sp)
  100.             moveq               #0,D0
  101.             dc.w                $A82A
  102.         EndM
  103.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  104.         IMPORT_CFM_FUNCTION CMMatchColors
  105.     ENDIF
  106.  
  107. ;
  108. ; pascal CMError CMCheckColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count, long *result)
  109. ;
  110.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  111.         Macro
  112.         _CMCheckColors
  113.             move.l              #$000C0002,-(sp)
  114.             moveq               #0,D0
  115.             dc.w                $A82A
  116.         EndM
  117.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  118.         IMPORT_CFM_FUNCTION CMCheckColors
  119.     ENDIF
  120.  
  121.  
  122. ;  Optional functions 
  123. ;
  124. ; pascal CMError CMMValidateProfile(ComponentInstance CMSession, CMProfileRef prof, Boolean *valid)
  125. ;
  126.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  127.         Macro
  128.         _CMMValidateProfile
  129.             move.l              #$00080008,-(sp)
  130.             moveq               #0,D0
  131.             dc.w                $A82A
  132.         EndM
  133.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  134.         IMPORT_CFM_FUNCTION CMMValidateProfile
  135.     ENDIF
  136.  
  137. ;
  138. ; pascal CMError CMMFlattenProfile(ComponentInstance CMSession, CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon)
  139. ;
  140.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  141.         Macro
  142.         _CMMFlattenProfile
  143.             move.l              #$0010000E,-(sp)
  144.             moveq               #0,D0
  145.             dc.w                $A82A
  146.         EndM
  147.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  148.         IMPORT_CFM_FUNCTION CMMFlattenProfile
  149.     ENDIF
  150.  
  151. ;
  152. ; pascal CMError CMMUnflattenProfile(ComponentInstance CMSession, FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon)
  153. ;
  154.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  155.         Macro
  156.         _CMMUnflattenProfile
  157.             move.l              #$000C000F,-(sp)
  158.             moveq               #0,D0
  159.             dc.w                $A82A
  160.         EndM
  161.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  162.         IMPORT_CFM_FUNCTION CMMUnflattenProfile
  163.     ENDIF
  164.  
  165. ;
  166. ; pascal CMError CMMatchBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  167. ;
  168.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  169.         Macro
  170.         _CMMatchBitmap
  171.             move.l              #$00100009,-(sp)
  172.             moveq               #0,D0
  173.             dc.w                $A82A
  174.         EndM
  175.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  176.         IMPORT_CFM_FUNCTION CMMatchBitmap
  177.     ENDIF
  178.  
  179. ;
  180. ; pascal CMError CMCheckBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  181. ;
  182.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  183.         Macro
  184.         _CMCheckBitmap
  185.             move.l              #$0010000A,-(sp)
  186.             moveq               #0,D0
  187.             dc.w                $A82A
  188.         EndM
  189.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  190.         IMPORT_CFM_FUNCTION CMCheckBitmap
  191.     ENDIF
  192.  
  193. ;
  194. ; pascal CMError CMMatchPixMap(ComponentInstance CMSession, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  195. ;
  196.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  197.         Macro
  198.         _CMMatchPixMap
  199.             move.l              #$000C0003,-(sp)
  200.             moveq               #0,D0
  201.             dc.w                $A82A
  202.         EndM
  203.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  204.         IMPORT_CFM_FUNCTION CMMatchPixMap
  205.     ENDIF
  206.  
  207. ;
  208. ; pascal CMError CMCheckPixMap(ComponentInstance CMSession, const PixMap *myPixMap, CMBitmapCallBackUPP progressProc, BitMap *myBitMap, void *refCon)
  209. ;
  210.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  211.         Macro
  212.         _CMCheckPixMap
  213.             move.l              #$00100004,-(sp)
  214.             moveq               #0,D0
  215.             dc.w                $A82A
  216.         EndM
  217.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  218.         IMPORT_CFM_FUNCTION CMCheckPixMap
  219.     ENDIF
  220.  
  221. ;
  222. ; pascal CMError CMConcatInit(ComponentInstance CMSession, CMConcatProfileSet *profileSet)
  223. ;
  224.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  225.         Macro
  226.         _CMConcatInit
  227.             move.l              #$00040007,-(sp)
  228.             moveq               #0,D0
  229.             dc.w                $A82A
  230.         EndM
  231.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  232.         IMPORT_CFM_FUNCTION CMConcatInit
  233.     ENDIF
  234.  
  235. ;
  236. ; pascal CMError CMNewLinkProfile(ComponentInstance CMSession, CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  237. ;
  238.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  239.         Macro
  240.         _CMNewLinkProfile
  241.             move.l              #$000C0010,-(sp)
  242.             moveq               #0,D0
  243.             dc.w                $A82A
  244.         EndM
  245.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  246.         IMPORT_CFM_FUNCTION CMNewLinkProfile
  247.     ENDIF
  248.  
  249. ;
  250. ; pascal CMError CMMGetPS2ColorSpace(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  251. ;
  252.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  253.         Macro
  254.         _CMMGetPS2ColorSpace
  255.             move.l              #$0010000B,-(sp)
  256.             moveq               #0,D0
  257.             dc.w                $A82A
  258.         EndM
  259.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  260.         IMPORT_CFM_FUNCTION CMMGetPS2ColorSpace
  261.     ENDIF
  262.  
  263. ;
  264. ; pascal CMError CMMGetPS2ColorRenderingIntent(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  265. ;
  266.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  267.         Macro
  268.         _CMMGetPS2ColorRenderingIntent
  269.             move.l              #$0010000C,-(sp)
  270.             moveq               #0,D0
  271.             dc.w                $A82A
  272.         EndM
  273.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  274.         IMPORT_CFM_FUNCTION CMMGetPS2ColorRenderingIntent
  275.     ENDIF
  276.  
  277. ;
  278. ; pascal CMError CMMGetPS2ColorRendering(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  279. ;
  280.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  281.         Macro
  282.         _CMMGetPS2ColorRendering
  283.             move.l              #$0014000D,-(sp)
  284.             moveq               #0,D0
  285.             dc.w                $A82A
  286.         EndM
  287.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  288.         IMPORT_CFM_FUNCTION CMMGetPS2ColorRendering
  289.     ENDIF
  290.  
  291. ;
  292. ; pascal CMError CMMGetPS2ColorRenderingVMSize(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize)
  293. ;
  294.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  295.         Macro
  296.         _CMMGetPS2ColorRenderingVMSize
  297.             move.l              #$000C0011,-(sp)
  298.             moveq               #0,D0
  299.             dc.w                $A82A
  300.         EndM
  301.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  302.         IMPORT_CFM_FUNCTION CMMGetPS2ColorRenderingVMSize
  303.     ENDIF
  304.  
  305. ;
  306. ; pascal CMError CMConcatenateProfiles(ComponentInstance CMSession, CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  307. ;
  308.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  309.         Macro
  310.         _CMConcatenateProfiles
  311.             move.l              #$000C0005,-(sp)
  312.             moveq               #0,D0
  313.             dc.w                $A82A
  314.         EndM
  315.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  316.         IMPORT_CFM_FUNCTION CMConcatenateProfiles
  317.     ENDIF
  318.  
  319. ;  Named Color functions 
  320. ;
  321. ; pascal CMError CMMGetNamedColorInfo(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long *deviceChannels, OSType *deviceColorSpace, OSType *PCSColorSpace, unsigned long *count, StringPtr prefix, StringPtr suffix)
  322. ;
  323.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  324.         Macro
  325.         _CMMGetNamedColorInfo
  326.             move.l              #$001C0046,-(sp)
  327.             moveq               #0,D0
  328.             dc.w                $A82A
  329.         EndM
  330.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  331.         IMPORT_CFM_FUNCTION CMMGetNamedColorInfo
  332.     ENDIF
  333.  
  334. ;
  335. ; pascal CMError CMMGetNamedColorValue(ComponentInstance CMSession, CMProfileRef prof, StringPtr name, CMColor *deviceColor, CMColor *PCSColor)
  336. ;
  337.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  338.         Macro
  339.         _CMMGetNamedColorValue
  340.             move.l              #$00100047,-(sp)
  341.             moveq               #0,D0
  342.             dc.w                $A82A
  343.         EndM
  344.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  345.         IMPORT_CFM_FUNCTION CMMGetNamedColorValue
  346.     ENDIF
  347.  
  348. ;
  349. ; pascal CMError CMMGetIndNamedColorValue(ComponentInstance CMSession, CMProfileRef prof, unsigned long index, CMColor *deviceColor, CMColor *PCSColor)
  350. ;
  351.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  352.         Macro
  353.         _CMMGetIndNamedColorValue
  354.             move.l              #$00100048,-(sp)
  355.             moveq               #0,D0
  356.             dc.w                $A82A
  357.         EndM
  358.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  359.         IMPORT_CFM_FUNCTION CMMGetIndNamedColorValue
  360.     ENDIF
  361.  
  362. ;
  363. ; pascal CMError CMMGetNamedColorIndex(ComponentInstance CMSession, CMProfileRef prof, StringPtr name, unsigned long *index)
  364. ;
  365.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  366.         Macro
  367.         _CMMGetNamedColorIndex
  368.             move.l              #$000C0049,-(sp)
  369.             moveq               #0,D0
  370.             dc.w                $A82A
  371.         EndM
  372.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  373.         IMPORT_CFM_FUNCTION CMMGetNamedColorIndex
  374.     ENDIF
  375.  
  376. ;
  377. ; pascal CMError CMMGetNamedColorName(ComponentInstance CMSession, CMProfileRef prof, unsigned long index, StringPtr name)
  378. ;
  379.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  380.         Macro
  381.         _CMMGetNamedColorName
  382.             move.l              #$000C004A,-(sp)
  383.             moveq               #0,D0
  384.             dc.w                $A82A
  385.         EndM
  386.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  387.         IMPORT_CFM_FUNCTION CMMGetNamedColorName
  388.     ENDIF
  389.  
  390.     ENDIF ; __CMMCOMPONENT__ 
  391.  
  392.